package com.example.stu.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Date: 2021/3/25
 * @Author: 黄先军
 * @Description:
 */
@RestController
@RequestMapping("/loginfalse")
public class LoginConfirm {

    /**
     * 管理员没有登录------跳到前端登录界面
     * @param resp
     * @throws IOException
     */
    @RequestMapping("admin")
    public void adminLogin( HttpServletResponse resp) throws IOException {
        resp.sendRedirect("/page/adminlogin.html");
    }

    /**
     * 学生没有登录------跳到前端登录界面
     * @param resp
     * @throws IOException
     */
    @RequestMapping("student")
    public void stuLogin( HttpServletResponse resp) throws IOException {
        resp.sendRedirect("/page/stulogin.html");
    }
}
